### Link: Error: Undefined entry, name: (Error 28) "qd" Referenced from: main in file: :Obj 68K:FIFDECO.c.o"qd" is the QuickDraw global variable. If I declare the global, as in
QDGlobals qd;the error goes away. This is confusing, because globals declared for PowerPC code should also be automatically declared for 68K files. In fact, this same code compiles and links correctly with Symantec C++ v7.0 IDE, as well as Metrowerks Codewarrior. Is there some new library I need to include to get the 68K global declared? Or has some subtle change been made to the header files?
QDGlobals qd;is all that is necessary. If you are working in multiple environments (say, MPW, Metrowerks, and Symantec), use a preprocessor conditional such as:
#if GENERATINGCFM QDGlobals qd; // Required for all CFM environments #else #ifndef SYMANTEC_C || SYMANTEC_CPLUS #define __MPW_ONLY__ #endif #if defined (__SC__) && defined(__MPW_ONLY__) QDGlobals qd; // Required for SC in MPW compilations #endif #undef __MPW_ONLY__ #endifmay be required.